<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>类样式</title>
		<style type="text/css">
			.mpic{
				height: 200%;
				width: 200%;
				border: 20px groove darkblue;
			}
		</style>
		<script src="jquery-3.2.1.min.js"></script>
		<script>
			$(function(){
				alert(4);
				$("img#book").addClass("mpic");
				alert(6);
				$("img#book").removeClass("mpic");
				//动态绑定元素的事件
				$("#showBtn").click(function(){
					$("#book").show();
				});
				
			});
			function hidePic(){
				$("#book").hide();//
			}
		</script>
	</head>
	<body>
		<img src="../day11/images/dog.jpg" id="book"/>
		<!--不太好-->
		<input type="button" value="隐藏图片" onclick="hidePic()"/>
		<input type="button" value="显示图片" id="showBtn"/>
	</body>
</html>
